<?php

class Application_Model_SysInfoService extends Base_Service
{
 
	private function loadSysInfo(){
		$db = $this->getDbAdapter();
		$sql = "select a.*"
		." from system_info a";
		$this->logger->debug(__METHOD__." sql: ".$sql);
		return $db->fetchAll($sql);
	}
	
	public function getSysInfoByKey($key)
	{
		$db = $this->getDbAdapter();
		$sql = "select a.value"
		." from system_info a"
		." where a.key='".$key."'";
		$this->logger->debug(__METHOD__." sql: ".$sql);
		$resultSet = $db->fetchAll($sql);		
		foreach ($resultSet as $row) {
			return $row['value'];			
		}
	}
	protected static $_instance = null;
	public static function getInstance() {
        if (null === self::$_instance) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }
		
}

